home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 37
/
037.d81
/
1000 miler
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
11KB
|
391 lines
45 dimb$(106),c$(106),a$(7,2),s%(8,2),h%(8,2)
50 gosub2350
60 poke249,224:poke250,204:poke251,0:poke252,64:poke253,0:poke254,0
70 poke255,0:sys51462:sys51459
80 :
90 te=50759:sp$="[160] ":s=54272
92 forx=stos+24:pokex,.:next:pokes+24,15
100 p1=1:p2=2:co=1:zy=1
110 :
120 s%(5,1)=1:s%(5,2)=1
130 fori=1to106:readb$(i):next:zz=106:gosub1150:poke53280,6
140 sh=48:xp=2:yp=0:gosub2220
150 syste,"200",267,25:syste,"200",267,137
160 syste,"0000",136,57:syste,"0000",136,169
170 fori=1to2:xx(i)=93:ml(i)=0
180 sl(i)=200:h%(2,i)=1:p(i)=1:m$(i)="000"
190 forl=1to6:a$(l,i)=c$(co):co=co+1:next:forl=1to6
200 ifleft$(a$(l,i),1)<>"3"then230
210 lf=val(mid$(a$(l,i),2,1)):s%(lf,i)=1:gosub1940
220 a$(l,i)=c$(co):co=co+1:goto200
230 next:p1=2
240 sh=46:xp=2:yp=0:gosub2220:sh=49:yp=14:gosub2220
250 next
260 p1=1
270 sh=47:xp=2:yp=14:gosub2220:sh=48:yp=0:gosub2220
280 a$(7,p1)=c$(co):gosub1130:ifleft$(a$(7,p1),1)<>"3"then300
290 lf=val(mid$(a$(7,p1),2,1)):s%(lf,p1)=1:l=6:gosub1940:goto280
300 ifp1=2andnp=1then550
310 ifnp=2thensyste,"hit any key to view cards",7*8,104:poke198,0:wait198,1:poke198,0
320 syste,sp$,16,104:gosub1790
330 syste,"(d)iscard (p)lay card (q)uit",4*8,104
340 gosub2190:syste,sp$,16,104
350 ifx$<>"p"andx$<>"q"andx$<>"d"then330
360 ifx$="q"then2080
370 syste,"which one (1-7) or 0 to end",4*8,104
380 poke198,0:wait198,1:gety$:syste,sp$,16,104
390 y=val(y$):remgetoffwhichone?
400 ify>7ory<1then330
410 gosub1820:ifx$<>"d"then430
420 b$(zy)=a$(y,p1):zy=zy+1:gosub700:goto650
430 le$=left$(a$(y,p1),1):lf=val(mid$(a$(y,p1),2,1))
440 fl=0:ifle$="4"andp(p1)=0andlf*25<=sl(p1)andml(p1)+lf*25<1001thenfl=1
450 iffl=1thenforl=1tolf:gosub1850:next:gosub700:goto650
460 fl=0:ifle$="1"andp(p2)=0ands%(lf,p2)=0thenfl=1
470 ifle$="1"andp(p2)=0ands%(2,p2)=0andlf=5andsl(p2)=200thenfl=1
480 iffl=1thenh%(lf,p2)=1:onlfgosub1470,1380,1550,1300,1630
490 iffl=1thengosub700:goto650
500 fl=0:ifle$="2"andh%(lf,p1)=1andlf<5thenfl=1
510 ifle$="2"andlf=5andh%(5,p1)=1andp(p1)=0thenfl=1
520 iffl=1thenh%(lf,p1)=0:onlfgosub1510,1420,1590,1340,1710
530 iffl=1thengosub700:goto650
540 fora=1to20:poke54296,.:poke54296,15:next:goto320
550 q=0:ifml(p2)-ml(p1)>299thengosub720:gosub800:gosub890:goto970
560 fl=0:ifp(p1)=1andml(p2)<701andml(p2)-ml(p1)<210thenfl=1
570 iffl=1thengosub890:gosub720:goto970
580 fl=0:ifp(p1)=1and(ml(p2)>700orml(p2)-ml(p1)>200)thenfl=1
590 iffl=1thengosub720:gosub890:goto970
600 fl=0:ifsl(p1)=75andml(p2)<801andml(p1)-ml(p2)>150thenfl=1
610 iffl=1thengosub890:gosub800:gosub720:goto970
620 fl=0:ifsl(p1)=75andml(p2)-ml(p1)>100thenfl=1
630 iffl=1thengosub720:gosub800:gosub890:goto970
640 gosub800:gosub720:gosub890:goto970
650 ifml(p1)=1000then2290:remwinner
660 ifp1=1thenp1=2:p2=1:sh=46:xp=2:yp=0:gosub2220:sh=49:yp=14:gosub2220:goto280
670 p1=1:p2=2
680 sh=47:xp=2:yp=14:gosub2220:sh=48:yp=0:gosub2220
690 goto280
700 a$(y,p1)=a$(7,p1):sh=40:xp=32:yp=11:gosub2220
710 return
720 ifp(p2)=1orq=1thenreturn
730 fory=1to7
740 lf=val(mid$(a$(y,p1),2,1)):fl=0
750 ifleft$(a$(y,p1),1)="1"ands%(lf,p2)=0thenfl=1
760 ifleft$(a$(y,p1),1)="1"andlf=5andsl(p2)=200ands%(2,p2)=0thenfl=1
770 iffl=1thenh%(lf,p2)=1:onlfgosub1470,1380,1550,1300,1630
780 iffl=1thenq=1:return
790 next:return
800 ifp(p1)=1orq=1thenreturn
810 hm=0:fory=1to7
820 lf=val(mid$(a$(y,p1),2,1))
830 ifleft$(a$(y,p1),1)="4"andlf*25<=sl(p1)then850
840 next:goto870
850 iflf*25>hm*25andml(p1)+lf*25<1001thenhm=lf:hc=y
860 goto840
870 ifhm=0thenreturn
880 forl=1tohm:gosub1850:next:y=hc:q=1:return
890 ifq=1thenreturn
900 fory=1to7
910 lf=val(mid$(a$(y,p1),2,1)):fl=0
920 ifleft$(a$(y,p1),1)="2"andh%(lf,p1)=1andlf<5thenfl=1
930 ifleft$(a$(y,p1),1)="2"andlf=5andh%(5,p1)=1andp(p1)=0thenfl=1
940 iffl=1thenh%(lf,p1)=0:onlfgosub1510,1420,1590,1340,1710
950 iffl=1thenq=1:return
960 next:return
970 ifq=1then1120
980 fory=1to7:lf=val(mid$(a$(y,p1),2,1))
990 ifleft$(a$(y,p1),1)="2"ands%(lf,p1)=1then1110
1000 next:fory=1to7:lf=val(mid$(a$(y,p1),2,1))
1010 ifleft$(a$(y,p1),1)="1"ands%(lf,p2)=1then1110
1020 next:fory=1to7:forx=1to7
1030 ifa$(y,p1)=a$(x,p1)thennc=nc+1
1040 next:ifnc>2thennc=0:goto1110
1050 nc=0:next:nc=0:fory=1to7
1060 ifleft$(a$(y,p1),1)="4"andval(mid$(a$(y,p1),2,1))*25<101then1110
1070 next:fory=1to7:forx=1to7
1080 ifa$(y,p1)=a$(x,p1)thennc=nc+1
1090 next:ifnc>1thennc=0:goto1110
1100 nc=0:next:nc=0:y=int(rnd(1)*7)+1
1110 b$(zy)=a$(y,p1):zy=zy+1
1120 gosub700:goto650
1130 co=co+1:ifco<>zz+1thenreturn
1140 zz=zy-1:zy=1:co=1
1150 syste,"shuffling the deck...",72,104
1152 fori=1tozz:r=int(rnd(1)*zz)+1
1160 :
1170 ifb$(r)<>"1"thenc$(i)=b$(r):b$(r)="1":nexti:syste,sp$,16,104:return
1180 r=r+1:ifr=zz+1thenr=1
1190 goto1170
1200 data4841,1427,2331,3136,2133,4343,4442,1230
1210 data1128,2235,2534,4442,4343,2235,1529,4244,4145,1326,4343,4442,2534
1220 data2331,1529,4145,4244,4244,4841,2133,1230,3338,2331,4343,4442,2432
1230 data1529,2432,2331,2235,4244,4442,4343,4442,4145,4244,1529,1128
1240 data2534,3237,1326,2235,4343,4841,4442,4145,1230,4244,2432,3439
1250 data2534,2235,1128,4442,4343,2534,2133,4145,4244,4442,4343,2432
1260 data2534,2331,2235,1230,1427,2235,1326,2235,2235,4343,4442,2331
1270 data2235,2133,1230,4145,4841,4442,4343,2133,2235
1280 data4145,2235,2432,2133,4244,4145,4244,4442,4145,1427,2235,2432
1290 data4244,4145,2235
1300 rem******flattire******
1310 gosub1380:p(p2)=1
1320 xp=3:yp=3+(p2-1)*14:goto10000
1330 :
1340 rem*****fixtheflat*****
1350 gosub1420:p(p1)=0
1360 xp=3:yp=3+(p1-1)*14:goto10035
1370 :
1380 rem****redlight*****
1390 p(p2)=1:forx=stos+24:pokex,0:next:pokes+24,15:p(p2)=1:gosub10190
1400 xp=30:yp=2+(p2-1)*14:sh=1:gosub2220
1405 fordl=1to200:next
1410 return
1420 rem****grnlight*****
1422 foraa=1to4:ifh%(aa,p1)<>0thenreturn
1423 next
1430 p(p1)=0:forx=stos+24:pokex,0:next:pokes+24,15:p(p1)=0:gosub10205
1440 xp=30:yp=2+(p1-1)*14:sh=2:ifsl(p1)=75thensh=50
1450 gosub2220
1455 fordl=1to200:next
1460 return
1470 rem****accident****
1480 gosub1380:p(p2)=1
1490 xp=8:yp=5+(p2-1)*14:goto10125
1500 :
1510 rem*****repairs*****
1520 gosub1420:p(p1)=0
1530 xp=8:yp=5+(p1-1)*14:goto10160
1540 :
1550 rem****nogas*****
1560 gosub1380:p(p2)=1
1570 xp=8:yp=2+(p2-1)*14:goto10055
1580 :
1590 rem*****fillup*****
1600 gosub1420:p(p1)=0
1610 xp=8:yp=2+(p1-1)*14:goto10090
1620 :
1630 rem*****speedlimit****
1640 sl(p2)=75:sh=50:xp=30:yp=2+(p2-1)*14:gosub2220:pokes+5,0:pokes+6,0
1645 xp=267:yp=25+(p2-1)*112
1650 forsl=200to75step-5:sl$=mid$(str$(sl),2)
1655 pokes+1,sl:pokes+4,17:pokes+4,0
1660 iflen(sl$)<3thensl$=" "+sl$:goto1660
1670 syste,sl$,xp,yp:syste," ",xp,yp
1680 next
1690 syste," 75",xp,yp
1700 return
1710 rem****endlimit*****
1720 sl(p1)=200:sh=2:xp=30:yp=2+(p1-1)*14:gosub2220:pokes+5,0:pokes+6,0
1725 xp=267:yp=25+(p1-1)*112
1730 forsl=75to200step5:sl$=mid$(str$(sl),2)
1732 pokes+1,sl:pokes+4,17:pokes+4,0
1740 iflen(sl$)<3thensl$=" "+sl$:goto1740
1750 syste,sl$,xp,yp:syste," ",xp,yp
1760 next
1770 syste,"200",xp,yp:sh=2:xp=30:yp=2+(p1-1)*14:gosub2220
1780 return
1790 rem*****drawcardshere*****
1800 xp=2:yp=11:fori=1to7:sh=val(right$(a$(i,p1),2)):gosub2220:xp=xp+5:next
1810 return
1820 rem*****getcardsoff*****
1830 xp=2:yp=11:fori=1to7:sh=40:gosub2220:xp=xp+5:next
1840 return
1850 rem*****mileagebox*****
1860 ml(p1)=ml(p1)+25:m$(p1)=mid$(str$(ml(p1)),2)
1870 iflen(m$(p1))<=3thenm$(p1)="0"+m$(p1):goto1870
1880 xp=16:yp=0+(p1-1)*14:t=20:ifrnd(1)<.1thent=57
1882 ifml(p1)=1000thent=51
1884 forx=stos+24:pokex,.:next
1890 forsh=ttot+5:poke54296,0:poke54296,15
1900 gosub2220:ift=51thenfordl=1to10:next
1910 next:ift=51thenfordl=1to1000:next:goto1930
1920 sh=20:gosub2220:syste,m$(p1),136,(p1-1)*112+57
1930 return
1940 xp=l*5+2:yp=11:fort=1to5:sh=40:gosub2220:sh=lf+35:gosub2220:next
1950 rem****blinkcard****
1960 iflf=1thensh=16:xp=3:yp=9+(p1-1)*14:gosub2220
1970 iflf=1thenifh%(1,p1)=1thenh%(1,p1)=0:gosub1510:goto2050
1975 rem iflf=2thensys51459:print"[147]"lf,h%(2,p1),h%(5,p1):stop
1980 iflf=2thensh=17:xp=10:yp=9+(p1-1)*14:gosub2220
1990 iflf=2thenifh%(2,p1)=1thenh%(2,p1)=0:gosub1420
2000 iflf=2andh%(5,p1)=1thenh%(5,p1)=0:gosub1710:goto2050
2010 iflf=3thensh=18:xp=19:yp=9+(p1-1)*14:gosub2220
2020 iflf=3thenifh%(3,p1)=1thenh%(3,p1)=0:gosub1590:goto2050
2030 iflf=4thensh=19:xp=26:yp=9+(p1-1